
const host = 'http://localhost:3000'


function btnAdd(){
    console.log("新增");
    
}
function btnEdit(){
    console.log("编辑");
    
}
function btnFilter(){
    console.log("过滤");
}
function btnDel(id){
    // console.log("删除");
    if(confirm('确认删除吗')){
        axios.delete(`${host}/blogs/${id}`).then((res)=>{
       
            let data=res.data;
            if(data.code===1000){
                let tr=document.querySelector(`.blog${id}`)
                tr.remove()
            }else{
                confirm(`${data.msg}`)
            }
        })
    }
    
    
}
function btnSave(){
    console.log("保存");
}
function btnCancel(){
    console.log("取消");
    
}

